/**
* @ClassName: Tj
* @Description: 
* @author YuYang
* @date 2013-6-17 下午9:21:39
*/
package com.yang.test;

import org.junit.Test;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.demodis.dao.DeterPersonDaoI;
import com.demodis.dao.impl.DeterPersonDaoImpl;
import com.demodis.service.DetContentServiceI;
import com.demodis.service.DeterGroupServiceI;
import com.demodis.service.impl.DetContentServiceImpl;
import com.demodis.service.impl.DeterGroupServiceImpl;
import com.demodis.util.Encrypt;

public class Tj {

	DetContentServiceI service = new DetContentServiceImpl();
	DeterGroupServiceI groupService = new DeterGroupServiceImpl();
	DeterPersonDaoI deterPerDao = new DeterPersonDaoImpl();
	
	@Test
	public void test01() {
//		System.out.println(service.getDeterManagerGroups(476));
//		System.out.println(service.getPresidentAndSecretariatAppraise(476));
//		System.out.println(service.getChargeGroupEmployeeAppraiseResult(476));
		//System.out.println(service.getZhijiGroupScore(6));
		//System.out.println(service.getAllFenguanLeaderScore(160));
//		System.out.println(service.getDeterScore(58));
//		System.out.println(service.getortherScore(58));
		//System.out.println(service.getZhijiGroupEmployeeAppraiseResult(160, 6));
		/*TblDeterPerson deterPer = new TblDeterPerson();
		deterPer.setUserId(476);
		deterPer.setPosId(6);
		System.out.println(service.jishuan(deterPer ));*/
		
		/*TblUser user = new TblUser();
		user.setGroupId(6);
		System.out.println(JSON.toJSONString(groupService.getDeterGroupsCU(user )));*/
		
		/*String password = "adminadmin";
		password = password.substring(password.length() - 6);
		System.out.println(password);*/
		
		System.out.println(deterPerDao.getUserPosIdByUserId(476));
	}
	
	@Test
	public void test02() {
		String str = "{\"userId\":\"161\",\"addupRes\":\"7.3333\"}";
		JSONObject jsonObj = JSON.parseObject(str);
		jsonObj.put("aa", "bb");
		System.out.println(jsonObj.getIntValue("userId"));
		System.out.println(jsonObj.getString("aa"));
		System.out.println(jsonObj.getDoubleValue("addupRes"));
		System.out.println(Double.parseDouble("345.4234"));
	}
	
	@Test
	public void test03() {
		String password = "admin";
		System.out.println(Encrypt.e(password));
	}
}
